#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("color.in","r",stdin);
	freopen("color.out","w",stdout);
    int n;
    cin >> n;
    for(int i = 1;i <= n;i++){
        int t;
        cin >> t;
        for(int j = 1;j <= t;j++){
            int a;
            cin >> a;
        }
        cout << 0;
    }
    return 0;
}
